<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="UTF-8">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/bootstrap.css" />
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/bootstrap-responsive.css" />
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/style.css" />
        <script type="text/javascript" src="__PUBLIC__/Js/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Js/jquery.sorted.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Js/bootstrap.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Js/ckform.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Js/common.js"></script>
        <script type="text/javascript" src="__PUBLIC__/js/date/WdatePicker.js"></script>
        <style type="text/css">
            body {
                padding-bottom: 40px;
            }
            .sidebar-nav {
                padding: 9px 0;
            }

            @media (max-width: 980px) {
                /* Enable use of floated navbar text */
                .navbar-text.pull-right {
                    float: none;
                    padding-left: 5px;
                    padding-right: 5px;
                }
            }
        </style>
        <script type="text/javascript">
            function del(id) {
                if (confirm('确认删除吗？')) {
                    location.href = '__APP__/User/del/id/' + id;
                }
            }
            function search() {
                window.location.href = "__SELF__?keyword=" + $("#keyword").val();
                $('#keyword').val('');
            }
        </script>
    </head>
    <body>
        <form class="form-inline definewidth m20" method="get" action="">
            按用户名：
            <input type="text" name="keyword" id="keyword" class="abc input-default">&nbsp;
            <button type="button" class="btn btn-primary" onclick='search()'>查询</button>&nbsp;
			<button id="addnew" class="btn btn-success" type="button" onclick="location.href='__APP__/Emp/add'">新增用户</button> 
        </form>
        
    </form>
    <table class="table table-bordered table-hover definewidth m10">
        <thead>
            <tr>
                <th>员工ID</th>
				<th>登陆ID</th>
                <th>用户名</th>
				<th>性别</th>
				<th>年龄</th>
				<th>电话</th>
				<th>员工类型</th>
                <th>最后登录时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <empty name="lists">
            <tr><td colspan="11">无查询记录</td></tr>
            <else />
            <volist name="lists" id="list">
                <tr>
                    <td>{$list.emp_id}</td>
					<td>{$list.loginid}</td>
                    <td>{$list.empname}</td>
					<td>
						<script>
							if({$list.sex}==0){
								document.write('未选');
							}else{
								if({$list.sex}==1){
									document.write('女');
								}else{
									document.write('男');
								}
							}
						</script>
					</td>
					<td>{$list.age}</td>
					<td>{$list.phone}</td>
					<td>
						<script>
							if({$list.emp_type}==0){
								document.write('管理员');
							}else{
								if({$list.emp_type}==1){
									document.write('调度员');
								}else{
									document.write('普通员工');
								}
							}
						</script>
					</td>
                    <td>{$list['lastlogintime']?$list['lastlogintime']|date="Y-m-d H:i",###:$list.lastlogintime|default='未登录'}</td>
                    <td>[<a href="__APP__/Emp/edit/emp_id/{$list.emp_id}">修改</a>]&nbsp;&nbsp;[<a href="__APP__/Emp/del/id/{$list.emp_id}">删除</a>]</td>

                </tr>
            </volist>
        </empty>

    </table>
    <div class="inline pull-right page">
        {$show}
    </div>
</body>
</html>